provider "alicloud" {
  region                = local.region
  version               = "1.199"
}

terraform {
  required_version      = "~> 0.12"  
  backend "oss" {
    bucket              = "deeproute-terraform-resources"
    key                 = "test/services/availability-zone"
    tablestore_endpoint = "https://terraform-status.cn-shenzhen.ots.aliyuncs.com"
    tablestore_table    = "terraform_statelock_table"    
    region              = "cn-shenzhen"
  }
}

locals {
  region                = "cn-shenzhen"
}

locals {
  cloudbox_vpc                    = "vpc-wz94gvzjd0qnjti24e8is"
  public_cloudbox_vswitch         = "vsw-wz9itft4zwi2waedturj6"
  prod_cloudbox_vswitch           = "vsw-wz9itft4zwi2waedturj6"
  availability_zone               = "cn-shenzhen-cnszsg-cb"
}

data "alicloud_instance_types" "main" {
    # availability_zone            = data.alicloud_zones.main.zones.0.id
    availability_zone            = local.availability_zone
    cpu_core_count               = "24"
    memory_size                  = "48"
    instance_type_family         = "ecs.c6"
    kubernetes_node_role         = "Worker"
}

output "instance_id" {
  value       = data.alicloud_instance_types.main.instance_types.0.id
}
